package com.wicket.okrpbff.web.contorller;

import com.wicket.okrpbff.biz.service.TagService;
import com.wicket.okrpbff.biz.service.dto.req.*;
import com.wicket.okrpbff.biz.service.dto.res.BffAddTagRespDto;
import com.wicket.okrpbff.biz.service.dto.res.BffQueryTagDetailRespDto;
import com.wicket.okrpbff.biz.service.dto.res.BffQueryTagListRespDto;
import com.wicket.okrpbff.biz.service.dto.res.BffUpdateTagRespDto;
import com.wicket.okrpbff.common.ro.OkrResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import com.wicket.okrframework.integration.FwBaseTagClient;
import com.wicket.okrframework.integration.dto.QueryTagListRespDto;
import com.wicket.okrframework.integration.dto.QueryTagListReqDto;
import com.wicket.okrframework.integration.FwBaseInductionRecordClient;
import com.wicket.okrframework.integration.dto.BatchQueryInductionRecordListComRespDto;
import com.wicket.okrframework.integration.dto.BatchQueryInductionRecordListComReqDto;
import java.util.stream.Collectors;
import cn.hutool.core.collection.CollectionUtil;
import com.wicket.okrframework.integration.dto.QueryTagDetailRespDto;
import com.wicket.okrframework.integration.dto.QueryTagDetailReqDto;
import com.wicket.okrframework.integration.dto.QueryInductionRecordInfoDetailComRespDto;
import com.wicket.okrframework.integration.dto.QueryInductionRecordInfoDetailComReqDto;
import com.wicket.okrpbff.common.exception.Assert;
import com.wicket.okrframework.integration.dto.AddTagRespDto;
import com.wicket.okrframework.integration.dto.AddTagReqDto;
import com.wicket.okrframework.integration.dto.UpdateTagRespDto;
import com.wicket.okrframework.integration.dto.UpdateTagReqDto;
import com.wicket.okrframework.integration.FwBaseBusinessObjectClient;
import com.wicket.okrframework.integration.dto.DeleteTagRespDto;
import com.wicket.okrframework.integration.dto.DeleteTagReqDto;
import com.wicket.okrpbff.biz.service.dto.res.BffDeleteTagRespDto;

/**
 * @author ：
 * @date ：
 *
 *
 * @version 1.0
 */
@Api(value = "Tag", tags = {"Tag"})
@RestController
// @RequestMapping("/poms/tag/")
public class TagController {
    @Autowired
    TagService tagService;

    /**
   * B1-1查询标签列表（平台）
   * gen by moon at 10/24/2022, 9:56:02 PM
   */
    @PostMapping("/oms/platform/tag/queryTagList")
    @ApiOperation(value = "B1-1查询标签列表（平台）", response = OkrResult.class)
    public OkrResult<BffQueryTagListRespDto> queryTagList(@RequestBody(required=false) @Validated BffQueryTagListReqDto reqDTO){
        return OkrResult.success(tagService.queryTagList(reqDTO));
    }

    /**
   * B1-1修改标签（平台）
   * gen by moon at 10/24/2022, 9:56:04 PM
   */
    @PostMapping("/oms/platform/tag/updateTag")
    @ApiOperation(value = "B1-1修改标签（平台）", response = OkrResult.class)
    public OkrResult<BffUpdateTagRespDto> updateTag(@RequestBody(required=false) @Validated BffUpdateTagReqDto reqDTO){
        return OkrResult.success(tagService.updateTag(reqDTO));
    }

    /**
   * B1-1新增标签（平台）
   * gen by moon at 10/24/2022, 9:56:03 PM
   */
    @PostMapping("/oms/platform/tag/addTag")
    @ApiOperation(value = "B1-1新增标签（平台）", response = OkrResult.class)
    public OkrResult<BffAddTagRespDto> addTag(@RequestBody(required=false) @Validated BffAddTagReqDto reqDTO){
        return OkrResult.success(tagService.addTag(reqDTO));
    }

    /**
   * B1-1查询标签详情（平台）
   * gen by moon at 10/28/2022, 11:08:52 PM
   */
    @PostMapping("/oms/platform/tag/queryTagDetail")
    @ApiOperation(value = "B1-1查询标签详情（平台）", response = OkrResult.class)
    public OkrResult<BffQueryTagDetailRespDto> queryTagDetail(@RequestBody(required=false) @Validated BffQueryTagDetailReqDto reqDTO){
        return OkrResult.success(tagService.queryTagDetail(reqDTO));
    }
/**
   * B1-1删除标签(管理)
   * gen by moon at 11/23/2022, 10:44:08 PM
   */
    @PostMapping("/oms/platform/mgt/tag/deleteTag")
    @ApiOperation(value = "B1-1删除标签(管理)", response = OkrResult.class)
    public OkrResult<BffDeleteTagRespDto> deleteTag(@RequestBody(required=false) @Validated BffDeleteTagReqDto reqDTO){
        return OkrResult.success(tagService.deleteTag(reqDTO));
    }

}

